package com.uduemc.biso.web.manage.controller;

import org.springframework.security.core.annotation.AuthenticationPrincipal;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/manage")
public class ManageController {

	@GetMapping(value= {"/","/index"})
	@ResponseBody
	public Object index(@AuthenticationPrincipal UserDetails User) {
		return User;
	}
	
	@GetMapping(value= {"/page"})
	public String page() {
		return "manage/page";
	}
}
